home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 April: Mac OS SDK / Dev.CD Apr 99 SDK1.toast / Development Kits / Interfaces&Libraries / Universal / Interfaces / CIncludes / ImageCodec.h < prev    next >
Encoding:
C/C++ Source or Header  |  1998-08-17  |  46.9 KB  |  1,412 lines  |  [TEXT/MPS ]

  1. /*
  2.      File:        ImageCodec.h
  3.  
  4.      Contains:    QuickTime Interfaces.
  5.  
  6.      Version:    Technology:    QuickTime 3.0
  7.                  Release:    Universal Interfaces 3.2
  8.  
  9.      Copyright:    © 1990-1998 by Apple Computer, Inc., all rights reserved
  10.  
  11.      Bugs?:        For bug reports, consult the following page on
  12.                  the World Wide Web:
  13.  
  14.                      http://developer.apple.com/bugreporter/
  15.  
  16. */
  17. #ifndef __IMAGECODEC__
  18. #define __IMAGECODEC__
  19.  
  20. #ifndef __MACTYPES__
  21. #include <MacTypes.h>
  22. #endif
  23. #ifndef __QUICKDRAW__
  24. #include <Quickdraw.h>
  25. #endif
  26. #ifndef __IMAGECOMPRESSION__
  27. #include <ImageCompression.h>
  28. #endif
  29. #ifndef __COMPONENTS__
  30. #include <Components.h>
  31. #endif
  32. #ifndef __MOVIES__
  33. #include <Movies.h>
  34. #endif
  35. #ifndef __GXTYPES__
  36. #include <GXTypes.h>
  37. #endif
  38.  
  39.  
  40.  
  41. #if PRAGMA_ONCE
  42. #pragma once
  43. #endif
  44.  
  45. #ifdef __cplusplus
  46. extern "C" {
  47. #endif
  48.  
  49. #if PRAGMA_IMPORT
  50. #pragma import on
  51. #endif
  52.  
  53. #if PRAGMA_STRUCT_ALIGN
  54.     #pragma options align=mac68k
  55. #elif PRAGMA_STRUCT_PACKPUSH
  56.     #pragma pack(push, 2)
  57. #elif PRAGMA_STRUCT_PACK
  58.     #pragma pack(2)
  59. #endif
  60.  
  61.  
  62. /*    codec capabilities flags    */
  63.  
  64. enum {
  65.     codecCanScale                = 1L << 0,
  66.     codecCanMask                = 1L << 1,
  67.     codecCanMatte                = 1L << 2,
  68.     codecCanTransform            = 1L << 3,
  69.     codecCanTransferMode        = 1L << 4,
  70.     codecCanCopyPrev            = 1L << 5,
  71.     codecCanSpool                = 1L << 6,
  72.     codecCanClipVertical        = 1L << 7,
  73.     codecCanClipRectangular        = 1L << 8,
  74.     codecCanRemapColor            = 1L << 9,
  75.     codecCanFastDither            = 1L << 10,
  76.     codecCanSrcExtract            = 1L << 11,
  77.     codecCanCopyPrevComp        = 1L << 12,
  78.     codecCanAsync                = 1L << 13,
  79.     codecCanMakeMask            = 1L << 14,
  80.     codecCanShift                = 1L << 15,
  81.     codecCanAsyncWhen            = 1L << 16,
  82.     codecCanShieldCursor        = 1L << 17,
  83.     codecCanManagePrevBuffer    = 1L << 18,
  84.     codecHasVolatileBuffer        = 1L << 19,
  85.     codecWantsRegionMask        = 1L << 20,
  86.     codecImageBufferIsOnScreen    = 1L << 21,
  87.     codecWantsDestinationPixels    = 1L << 22,
  88.     codecWantsSpecialScaling    = 1L << 23,
  89.     codecHandlesInputs            = 1L << 24,
  90.     codecCanDoIndirectSurface    = 1L << 25,
  91.     codecIsSequenceSensitive    = 1L << 26,
  92.     codecRequiresOffscreen        = 1L << 27,
  93.     codecRequiresMaskBits        = 1L << 28,
  94.     codecCanRemapResolution        = 1L << 29,
  95.     codecIsDirectToScreenOnly    = 1L << 30,
  96.     codecCanLockSurface            = 1L << 31
  97. };
  98.  
  99.  
  100. struct CodecCapabilities {
  101.     long                             flags;
  102.     short                             wantedPixelSize;
  103.     short                             extendWidth;
  104.     short                             extendHeight;
  105.     short                             bandMin;
  106.     short                             bandInc;
  107.     short                             pad;
  108.     unsigned long                     time;
  109. };
  110. typedef struct CodecCapabilities        CodecCapabilities;
  111. /*    codec condition flags    */
  112.  
  113. enum {
  114.     codecConditionFirstBand        = 1L << 0,
  115.     codecConditionLastBand        = 1L << 1,
  116.     codecConditionFirstFrame    = 1L << 2,
  117.     codecConditionNewDepth        = 1L << 3,
  118.     codecConditionNewTransform    = 1L << 4,
  119.     codecConditionNewSrcRect    = 1L << 5,
  120.     codecConditionNewMask        = 1L << 6,
  121.     codecConditionNewMatte        = 1L << 7,
  122.     codecConditionNewTransferMode = 1L << 8,
  123.     codecConditionNewClut        = 1L << 9,
  124.     codecConditionNewAccuracy    = 1L << 10,
  125.     codecConditionNewDestination = 1L << 11,
  126.     codecConditionFirstScreen    = 1L << 12,
  127.     codecConditionDoCursor        = 1L << 13,
  128.     codecConditionCatchUpDiff    = 1L << 14,
  129.     codecConditionMaskMayBeChanged = 1L << 15,
  130.     codecConditionToBuffer        = 1L << 16,
  131.     codecConditionCodecChangedMask = 1L << 31
  132. };
  133.  
  134.  
  135.  
  136. enum {
  137.     codecInfoResourceType        = FOUR_CHAR_CODE('cdci'),        /* codec info resource type */
  138.     codecInterfaceVersion        = 2                                /* high word returned in component GetVersion */
  139. };
  140.  
  141.  
  142. struct CDSequenceDataSourceQueueEntry {
  143.     void *                            nextBusy;
  144.  
  145.     long                             descSeed;
  146.     Handle                             dataDesc;
  147.     void *                            data;
  148.     long                             dataSize;
  149.  
  150.     long                             useCount;
  151.  
  152.     TimeValue                         frameTime;
  153.     TimeValue                         frameDuration;
  154.     TimeValue                         timeScale;
  155. };
  156. typedef struct CDSequenceDataSourceQueueEntry CDSequenceDataSourceQueueEntry;
  157. typedef CDSequenceDataSourceQueueEntry * CDSequenceDataSourceQueueEntryPtr;
  158.  
  159. struct CDSequenceDataSource {
  160.     long                             recordSize;
  161.  
  162.     void *                            next;
  163.  
  164.     ImageSequence                     seqID;
  165.     ImageSequenceDataSource         sourceID;
  166.     OSType                             sourceType;
  167.     long                             sourceInputNumber;
  168.     void *                            dataPtr;
  169.     Handle                             dataDescription;
  170.     long                             changeSeed;
  171.     ICMConvertDataFormatUPP         transferProc;
  172.     void *                            transferRefcon;
  173.     long                             dataSize;
  174.  
  175.                                                                 /* fields available in QT 3 and later */
  176.  
  177.     QHdrPtr                         dataQueue;                    /* queue of CDSequenceDataSourceQueueEntry structures*/
  178.  
  179.     void *                            originalDataPtr;
  180.     long                             originalDataSize;
  181.     Handle                             originalDataDescription;
  182.     long                             originalDataDescriptionSeed;
  183. };
  184. typedef struct CDSequenceDataSource        CDSequenceDataSource;
  185. typedef CDSequenceDataSource *            CDSequenceDataSourcePtr;
  186.  
  187. struct ICMFrameTimeInfo {
  188.     wide                             startTime;
  189.     long                             scale;
  190.     long                             duration;
  191. };
  192. typedef struct ICMFrameTimeInfo            ICMFrameTimeInfo;
  193. typedef ICMFrameTimeInfo *                ICMFrameTimeInfoPtr;
  194.  
  195. struct CodecCompressParams {
  196.     ImageSequence                     sequenceID;                    /* precompress,bandcompress */
  197.     ImageDescriptionHandle             imageDescription;            /* precompress,bandcompress */
  198.     Ptr                             data;
  199.     long                             bufferSize;
  200.     long                             frameNumber;
  201.     long                             startLine;
  202.     long                             stopLine;
  203.     long                             conditionFlags;
  204.     CodecFlags                         callerFlags;
  205.     CodecCapabilities *                capabilities;                /* precompress,bandcompress */
  206.     ICMProgressProcRecord             progressProcRecord;
  207.     ICMCompletionProcRecord         completionProcRecord;
  208.     ICMFlushProcRecord                 flushProcRecord;
  209.  
  210.     PixMap                             srcPixMap;                    /* precompress,bandcompress */
  211.     PixMap                             prevPixMap;
  212.     CodecQ                             spatialQuality;
  213.     CodecQ                             temporalQuality;
  214.     Fixed                             similarity;
  215.     DataRateParamsPtr                 dataRateParams;
  216.     long                             reserved;
  217.  
  218.                                                                 /* The following fields only exist for QuickTime 2.1 and greater */
  219.     UInt16                             majorSourceChangeSeed;
  220.     UInt16                             minorSourceChangeSeed;
  221.     CDSequenceDataSourcePtr         sourceData;
  222.  
  223.                                                                 /* The following fields only exit for QuickTime 2.5 and greater */
  224.     long                             preferredPacketSizeInBytes;
  225.  
  226.                                                                 /* The following fields only exit for QuickTime 3.0 and greater */
  227.     long                             requestedBufferWidth;        /* must set codecWantsSpecialScaling to indicate this field is valid*/
  228.     long                             requestedBufferHeight;        /* must set codecWantsSpecialScaling to indicate this field is valid*/
  229. };
  230. typedef struct CodecCompressParams        CodecCompressParams;
  231.  
  232. struct CodecDecompressParams {
  233.     ImageSequence                     sequenceID;                    /* predecompress,banddecompress */
  234.     ImageDescriptionHandle             imageDescription;            /* predecompress,banddecompress */
  235.     Ptr                             data;
  236.     long                             bufferSize;
  237.     long                             frameNumber;
  238.     long                             startLine;
  239.     long                             stopLine;
  240.     long                             conditionFlags;
  241.     CodecFlags                         callerFlags;
  242.     CodecCapabilities *                capabilities;                /* predecompress,banddecompress */
  243.     ICMProgressProcRecord             progressProcRecord;
  244.     ICMCompletionProcRecord         completionProcRecord;
  245.     ICMDataProcRecord                 dataProcRecord;
  246.  
  247.     CGrafPtr                         port;                        /* predecompress,banddecompress */
  248.     PixMap                             dstPixMap;                    /* predecompress,banddecompress */
  249.     BitMapPtr                         maskBits;
  250.     PixMapPtr                         mattePixMap;
  251.     Rect                             srcRect;                    /* predecompress,banddecompress */
  252.     MatrixRecord *                    matrix;                        /* predecompress,banddecompress */
  253.     CodecQ                             accuracy;                    /* predecompress,banddecompress */
  254.     short                             transferMode;                /* predecompress,banddecompress */
  255.     ICMFrameTimePtr                 frameTime;                    /* banddecompress */
  256.     long                             reserved[1];
  257.                                                                 /* The following fields only exist for QuickTime 2.0 and greater */
  258.     SInt8                             matrixFlags;                /* high bit set if 2x resize */
  259.     SInt8                             matrixType;
  260.     Rect                             dstRect;                    /* only valid for simple transforms */
  261.                                                                 /* The following fields only exist for QuickTime 2.1 and greater */
  262.     UInt16                             majorSourceChangeSeed;
  263.     UInt16                             minorSourceChangeSeed;
  264.     CDSequenceDataSourcePtr         sourceData;
  265.  
  266.     RgnHandle                         maskRegion;
  267.  
  268.                                                                 /* The following fields only exist for QuickTime 2.5 and greater */
  269.  
  270.     OSType **                        wantedDestinationPixelTypes; /* Handle to 0-terminated list of OSTypes */
  271.  
  272.     long                             screenFloodMethod;
  273.     long                             screenFloodValue;
  274.     short                             preferredOffscreenPixelSize;
  275.  
  276.                                                                 /* The following fields only exist for QuickTime 3.0 and greater */
  277.     ICMFrameTimeInfoPtr             syncFrameTime;                /* banddecompress */
  278.     Boolean                         needUpdateOnTimeChange;        /* banddecompress */
  279.     Boolean                         enableBlackLining;
  280.     Boolean                         needUpdateOnSourceChange;    /* band decompress */
  281.     Boolean                         pad;
  282.  
  283.     long                             unused;
  284.  
  285.     CGrafPtr                         finalDestinationPort;
  286.  
  287.     long                             requestedBufferWidth;        /* must set codecWantsSpecialScaling to indicate this field is valid*/
  288.     long                             requestedBufferHeight;        /* must set codecWantsSpecialScaling to indicate this field is valid*/
  289. };
  290. typedef struct CodecDecompressParams    CodecDecompressParams;
  291.  
  292. enum {
  293.     matrixFlagScale2x            = 1L << 7,
  294.     matrixFlagScale1x            = 1L << 6,
  295.     matrixFlagScaleHalf            = 1L << 5
  296. };
  297.  
  298.  
  299. enum {
  300.     kScreenFloodMethodNone        = 0,
  301.     kScreenFloodMethodKeyColor    = 1,
  302.     kScreenFloodMethodAlpha        = 2
  303. };
  304.  
  305.  
  306. enum {
  307.     kFlushLastQueuedFrame        = 0,
  308.     kFlushFirstQueuedFrame        = 1
  309. };
  310.  
  311.  
  312. enum {
  313.     kNewImageGWorldErase        = 1L << 0
  314. };
  315.  
  316.  
  317. struct ImageSubCodecDecompressCapabilities {
  318.     long                             recordSize;                    /* sizeof(ImageSubCodecDecompressCapabilities)*/
  319.     long                             decompressRecordSize;        /* size of your codec's decompress record*/
  320.     Boolean                         canAsync;                    /* default true*/
  321.     UInt8                             pad[3];
  322. };
  323. typedef struct ImageSubCodecDecompressCapabilities ImageSubCodecDecompressCapabilities;
  324.  
  325. enum {
  326.     kCodecFrameTypeUnknown        = 0,
  327.     kCodecFrameTypeKey            = 1,
  328.     kCodecFrameTypeDifference    = 2,
  329.     kCodecFrameTypeDroppableDifference = 3
  330. };
  331.  
  332.  
  333. struct ImageSubCodecDecompressRecord {
  334.     Ptr                             baseAddr;
  335.     long                             rowBytes;
  336.     Ptr                             codecData;
  337.     ICMProgressProcRecord             progressProcRecord;
  338.     ICMDataProcRecord                 dataProcRecord;
  339.     void *                            userDecompressRecord;        /* pointer to codec-specific per-band data*/
  340.     UInt8                             frameType;
  341.     UInt8                             pad[3];
  342. };
  343. typedef struct ImageSubCodecDecompressRecord ImageSubCodecDecompressRecord;
  344. /* name of parameters or effect -- placed in root container, required */
  345.  
  346. enum {
  347.     kParameterTitleName            = FOUR_CHAR_CODE('name'),
  348.     kParameterTitleID            = 1
  349. };
  350.  
  351. /* codec sub-type of parameters or effect -- placed in root container, required */
  352.  
  353. enum {
  354.     kParameterWhatName            = FOUR_CHAR_CODE('what'),
  355.     kParameterWhatID            = 1
  356. };
  357.  
  358. /* effect version -- placed in root container, optional, but recommended */
  359.  
  360. enum {
  361.     kParameterVersionName        = FOUR_CHAR_CODE('vers'),
  362.     kParameterVersionID            = 1
  363. };
  364.  
  365. /* is effect repeatable -- placed in root container, optional, default is TRUE*/
  366.  
  367. enum {
  368.     kParameterRepeatableName    = FOUR_CHAR_CODE('pete'),
  369.     kParameterRepeatableID        = 1
  370. };
  371.  
  372.  
  373. enum {
  374.     kParameterRepeatableTrue    = 1,
  375.     kParameterRepeatableFalse    = 0
  376. };
  377.  
  378. /* substitution codec in case effect is missing -- placed in root container, recommended */
  379.  
  380. enum {
  381.     kParameterAlternateCodecName = FOUR_CHAR_CODE('subs'),
  382.     kParameterAlternateCodecID    = 1
  383. };
  384.  
  385. /* maximum number of sources -- placed in root container, required */
  386.  
  387. enum {
  388.     kParameterSourceCountName    = FOUR_CHAR_CODE('srcs'),
  389.     kParameterSourceCountID        = 1
  390. };
  391.  
  392.  
  393.  
  394. enum {
  395.     kParameterDependencyName    = FOUR_CHAR_CODE('deep'),
  396.     kParameterDependencyID        = 1
  397. };
  398.  
  399.  
  400. enum {
  401.     kParameterListDependsUponColorProfiles = FOUR_CHAR_CODE('prof'),
  402.     kParameterListDependsUponFonts = FOUR_CHAR_CODE('font')
  403. };
  404.  
  405.  
  406. struct ParameterDependancyRecord {
  407.     long                             dependCount;
  408.     OSType                             depends[1];
  409. };
  410. typedef struct ParameterDependancyRecord ParameterDependancyRecord;
  411. /*
  412.    enumeration list in container -- placed in root container, optional unless used by a
  413.    parameter in the list
  414. */
  415.  
  416. enum {
  417.     kParameterEnumList            = FOUR_CHAR_CODE('enum')
  418. };
  419.  
  420.  
  421. struct EnumValuePair {
  422.     long                             value;
  423.     Str255                             name;
  424. };
  425. typedef struct EnumValuePair            EnumValuePair;
  426.  
  427. struct EnumListRecord {
  428.     long                             enumCount;                    /* number of enumeration items to follow*/
  429.     EnumValuePair                     values[1];                    /* values and names for them, packed */
  430. };
  431. typedef struct EnumListRecord            EnumListRecord;
  432. /* atom type of parameter*/
  433.  
  434. enum {
  435.     kParameterAtomTypeAndID        = FOUR_CHAR_CODE('type')
  436. };
  437.  
  438.  
  439. enum {
  440.     kNoAtom                        = FOUR_CHAR_CODE('none'),        /* atom type for no data got/set*/
  441.     kAtomNoFlags                = 0x00000000,
  442.     kAtomNotInterpolated        = 0x00000001,                    /* atom can never be interpolated*/
  443.     kAtomInterpolateIsOptional    = 0x00000002                    /* atom can be interpolated, but it is an advanced user operation*/
  444. };
  445.  
  446.  
  447. struct ParameterAtomTypeAndID {
  448.     QTAtomType                         atomType;                    /* type of atom this data comes from/goes into*/
  449.     QTAtomID                         atomID;                        /* ID of atom this data comes from/goes into*/
  450.     long                             atomFlags;                    /* options for this atom*/
  451.     Str255                             atomName;                    /* name of this value type*/
  452. };
  453. typedef struct ParameterAtomTypeAndID    ParameterAtomTypeAndID;
  454. /* data type of a parameter*/
  455.  
  456. enum {
  457.     kParameterDataType            = FOUR_CHAR_CODE('data')
  458. };
  459.  
  460.  
  461. enum {
  462.     kParameterTypeDataLong        = kTweenTypeLong,                /* integer value*/
  463.     kParameterTypeDataFixed        = kTweenTypeFixed,                /* fixed point value*/
  464.     kParameterTypeDataRGBValue    = kTweenTypeRGBColor,            /* RGBColor data*/
  465.     kParameterTypeDataDouble    = kTweenTypeQTFloatDouble,        /* IEEE 64 bit floating point value*/
  466.     kParameterTypeDataText        = FOUR_CHAR_CODE('text'),        /* editable text item*/
  467.     kParameterTypeDataEnum        = FOUR_CHAR_CODE('enum'),        /* enumerated lookup value*/
  468.     kParameterTypeDataBitField    = FOUR_CHAR_CODE('bool'),        /* bit field value (something that holds boolean(s))*/
  469.     kParameterTypeDataImage        = FOUR_CHAR_CODE('imag')        /* reference to an image via Picture data*/
  470. };
  471.  
  472.  
  473. struct ParameterDataType {
  474.     OSType                             dataType;                    /* type of data this item is stored as*/
  475. };
  476. typedef struct ParameterDataType        ParameterDataType;
  477. /*
  478.    alternate (optional) data type -- main data type always required.  
  479.    Must be modified or deleted when modifying main data type.
  480.    Main data type must be modified when alternate is modified.
  481. */
  482.  
  483. enum {
  484.     kParameterAlternateDataType    = FOUR_CHAR_CODE('alt1'),
  485.     kParameterTypeDataColorValue = FOUR_CHAR_CODE('cmlr'),        /* CMColor data (supported on machines with ColorSync)*/
  486.     kParameterTypeDataCubic        = FOUR_CHAR_CODE('cubi'),        /* cubic bezier(s) (no built-in support)*/
  487.     kParameterTypeDataNURB        = FOUR_CHAR_CODE('nurb')        /* nurb(s) (no built-in support)*/
  488. };
  489.  
  490.  
  491. struct ParameterAlternateDataEntry {
  492.     OSType                             dataType;                    /* type of data this item is stored as*/
  493.     QTAtomType                         alternateAtom;                /* where to store*/
  494. };
  495. typedef struct ParameterAlternateDataEntry ParameterAlternateDataEntry;
  496.  
  497. struct ParameterAlternateDataType {
  498.     long                             numEntries;
  499.     ParameterAlternateDataEntry     entries[1];
  500. };
  501. typedef struct ParameterAlternateDataType ParameterAlternateDataType;
  502. /* legal values for the parameter*/
  503.  
  504. enum {
  505.     kParameterDataRange            = FOUR_CHAR_CODE('rang')
  506. };
  507.  
  508.  
  509. enum {
  510.     kNoMinimumLongFixed            = 0x7FFFFFFF,                    /* ignore minimum/maxiumum values*/
  511.     kNoMaximumLongFixed            = (long)0x80000000,
  512.     kNoScaleLongFixed            = 0,                            /* don't perform any scaling of value*/
  513.     kNoPrecision                = (-1)                            /* allow as many digits as format*/
  514. };
  515.  
  516. /* 'text'*/
  517.  
  518. struct StringRangeRecord {
  519.     long                             maxChars;                    /* maximum length of string*/
  520.     long                             maxLines;                    /* number of editing lines to use (1 typical, 0 to default)*/
  521. };
  522. typedef struct StringRangeRecord        StringRangeRecord;
  523. /* 'long'*/
  524.  
  525. struct LongRangeRecord {
  526.     long                             minValue;                    /* no less than this*/
  527.     long                             maxValue;                    /* no more than this*/
  528.     long                             scaleValue;                    /* muliply content by this going in, divide going out*/
  529.     long                             precisionDigits;            /* # digits of precision when editing via typing*/
  530. };
  531. typedef struct LongRangeRecord            LongRangeRecord;
  532. /* 'enum'*/
  533.  
  534. struct EnumRangeRecord {
  535.     long                             enumID;                        /* 'enum' list in root container to search within*/
  536. };
  537. typedef struct EnumRangeRecord            EnumRangeRecord;
  538. /* 'fixd'*/
  539.  
  540. struct FixedRangeRecord {
  541.     Fixed                             minValue;                    /* no less than this*/
  542.     Fixed                             maxValue;                    /* no more than this*/
  543.     Fixed                             scaleValue;                    /* muliply content by this going in, divide going out*/
  544.     long                             precisionDigits;            /* # digits of precision when editing via typing*/
  545. };
  546. typedef struct FixedRangeRecord            FixedRangeRecord;
  547. /* 'doub'*/
  548.  
  549.     #define kNoMinimumDouble        (NAN)                    /* ignore minimum/maxiumum values */
  550.     #define kNoMaximumDouble        (NAN)
  551.     #define kNoScaleDouble            (0)                        /* don't perform any scaling of value */
  552.     struct DoubleRangeRecord
  553.         {
  554.         QTFloatDouble        minValue;            /* no less than this */
  555.         QTFloatDouble        maxValue;            /* no more than this */
  556.         QTFloatDouble        scaleValue;            /* muliply content by this going in, divide going out */
  557.         long                precisionDigits;    /* # digits of precision when editing via typing */
  558.         };
  559.     typedef struct DoubleRangeRecord DoubleRangeRecord;
  560.     
  561. /* 'bool'    */
  562.  
  563. struct BooleanRangeRecord {
  564.     long                             maskValue;                    /* value to mask on/off to set/clear the boolean*/
  565. };
  566. typedef struct BooleanRangeRecord        BooleanRangeRecord;
  567. /* 'rgb '*/
  568.  
  569. struct RGBRangeRecord {
  570.     RGBColor                         minColor;
  571.     RGBColor                         maxColor;
  572. };
  573. typedef struct RGBRangeRecord            RGBRangeRecord;
  574. /* 'imag'*/
  575.  
  576. enum {
  577.     kParameterImageNoFlags        = 0
  578. };
  579.  
  580.  
  581. struct ImageRangeRecord {
  582.     long                             imageFlags;
  583. };
  584. typedef struct ImageRangeRecord            ImageRangeRecord;
  585. /* union of all of the above*/
  586.  
  587.     struct ParameterRangeRecord
  588.         {
  589.         union 
  590.             {
  591.             LongRangeRecord        longRange;
  592.             EnumRangeRecord        enumRange;
  593.             FixedRangeRecord    fixedRange;
  594.             DoubleRangeRecord    doubleRange;
  595.             StringRangeRecord    stringRange;
  596.             BooleanRangeRecord    booleanRange;
  597.             RGBRangeRecord        rgbRange;
  598.             ImageRangeRecord    imageRange;
  599.             } u;
  600.         };
  601.     typedef struct ParameterRangeRecord ParameterRangeRecord;
  602.     
  603. /* UI behavior of a parameter*/
  604.  
  605. enum {
  606.     kParameterDataBehavior        = FOUR_CHAR_CODE('ditl')
  607. };
  608.  
  609.  
  610. enum {
  611.                                                                 /* items edited via typing*/
  612.     kParameterItemEditText        = FOUR_CHAR_CODE('edit'),        /* edit text box*/
  613.     kParameterItemEditLong        = FOUR_CHAR_CODE('long'),        /* long number editing box*/
  614.     kParameterItemEditFixed        = FOUR_CHAR_CODE('fixd'),        /* fixed point number editing box*/
  615.     kParameterItemEditDouble    = FOUR_CHAR_CODE('doub'),        /* double number editing box*/
  616.                                                                 /* items edited via control(s)*/
  617.     kParameterItemPopUp            = FOUR_CHAR_CODE('popu'),        /* pop up value for enum types*/
  618.     kParameterItemRadioCluster    = FOUR_CHAR_CODE('radi'),        /* radio cluster for enum types*/
  619.     kParameterItemCheckBox        = FOUR_CHAR_CODE('chex'),        /* check box for booleans*/
  620.     kParameterItemControl        = FOUR_CHAR_CODE('cntl'),        /* item controlled via a standard control of some type*/
  621.                                                                 /* special user items*/
  622.     kParameterItemLine            = FOUR_CHAR_CODE('line'),        /* line*/
  623.     kParameterItemColorPicker    = FOUR_CHAR_CODE('pick'),        /* color swatch & picker*/
  624.     kParameterItemGroupDivider    = FOUR_CHAR_CODE('divi'),        /* start of a new group of items*/
  625.     kParameterItemStaticText    = FOUR_CHAR_CODE('stat'),        /* display "parameter name" as static text*/
  626.     kParameterItemDragImage        = FOUR_CHAR_CODE('imag'),        /* allow image display, along with drag and drop*/
  627.                                                                 /* flags valid for lines and groups*/
  628.     kGraphicsNoFlags            = 0x00000000,                    /* no options for graphics*/
  629.     kGraphicsFlagsGray            = 0x00000001,                    /* draw lines with gray*/
  630.                                                                 /* flags valid for groups*/
  631.     kGroupNoFlags                = 0x00000000,                    /* no options for group -- may be combined with graphics options                        */
  632.     kGroupAlignText                = 0x00010000,                    /* edit text items in group have the same size*/
  633.     kGroupSurroundBox            = 0x00020000,                    /* group should be surrounded with a box*/
  634.     kGroupMatrix                = 0x00040000,                    /* side-by-side arrangement of group is okay*/
  635.     kGroupNoName                = 0x00080000,                    /* name of group should not be displayed above box*/
  636.                                                                 /* flags valid for popup/radiocluster/checkbox/control*/
  637.     kDisableControl                = 0x00000001,
  638.     kDisableWhenNotEqual        = (0x00000000 + kDisableControl),
  639.     kDisableWhenEqual            = (0x00000010 + kDisableControl),
  640.     kDisableWhenLessThan        = (0x00000020 + kDisableControl),
  641.     kDisableWhenGreaterThan        = (0x00000030 + kDisableControl), /* flags valid for popups*/
  642.     kPopupStoreAsString            = 0x00010000
  643. };
  644.  
  645.  
  646. struct ControlBehaviors {
  647.     QTAtomID                         groupID;                    /* group under control of this item*/
  648.     long                             controlValue;                /* control value for comparison purposes*/
  649. };
  650. typedef struct ControlBehaviors            ControlBehaviors;
  651.  
  652. struct ParameterDataBehavior {
  653.     OSType                             behaviorType;
  654.     long                             behaviorFlags;
  655.     union {
  656.         ControlBehaviors                 controls;
  657.     }                                 u;
  658. };
  659. typedef struct ParameterDataBehavior    ParameterDataBehavior;
  660. /* higher level purpose of a parameter or set of parameters*/
  661.  
  662. enum {
  663.     kParameterDataUsage            = FOUR_CHAR_CODE('use ')
  664. };
  665.  
  666.  
  667. enum {
  668.     kParameterUsagePixels        = FOUR_CHAR_CODE('pixl'),
  669.     kParameterUsageRectangle    = FOUR_CHAR_CODE('rect'),
  670.     kParameterUsagePoint        = FOUR_CHAR_CODE('xy  '),
  671.     kParameterUsage3DPoint        = FOUR_CHAR_CODE('xyz '),
  672.     kParameterUsageDegrees        = FOUR_CHAR_CODE('degr'),
  673.     kParameterUsageRadians        = FOUR_CHAR_CODE('rads'),
  674.     kParameterUsagePercent        = FOUR_CHAR_CODE('pcnt'),
  675.     kParameterUsageSeconds        = FOUR_CHAR_CODE('secs'),
  676.     kParameterUsageMilliseconds    = FOUR_CHAR_CODE('msec'),
  677.     kParameterUsageMicroseconds    = FOUR_CHAR_CODE('µsec'),
  678.     kParameterUsage3by3Matrix    = FOUR_CHAR_CODE('3by3')
  679. };
  680.  
  681.  
  682. struct ParameterDataUsage {
  683.     OSType                             usageType;                    /* higher level purpose of the data or group*/
  684. };
  685. typedef struct ParameterDataUsage        ParameterDataUsage;
  686. /* default value(s) for a parameter*/
  687.  
  688. enum {
  689.     kParameterDataDefaultItem    = FOUR_CHAR_CODE('dflt')
  690. };
  691.  
  692. /* atoms that help to fill in data within the info window */
  693.  
  694. enum {
  695.     kParameterInfoLongName        = FOUR_CHAR_CODE('©nam'),
  696.     kParameterInfoCopyright        = FOUR_CHAR_CODE('©cpy'),
  697.     kParameterInfoDescription    = FOUR_CHAR_CODE('©inf'),
  698.     kParameterInfoWindowTitle    = FOUR_CHAR_CODE('©wnt'),
  699.     kParameterInfoPicture        = FOUR_CHAR_CODE('©pix'),
  700.     kParameterInfoManufacturer    = FOUR_CHAR_CODE('©man'),
  701.     kParameterInfoIDs            = 1
  702. };
  703.  
  704. /* flags for ImageCodecValidateParameters */
  705.  
  706. enum {
  707.     kParameterValidationNoFlags    = 0x00000000,
  708.     kParameterValidationFinalValidation = 0x00000001
  709. };
  710.  
  711.  
  712. typedef long                             QTParameterValidationOptions;
  713. /* QTAtomTypes for atoms in image compressor settings containers*/
  714.  
  715. enum {
  716.     kImageCodecSettingsFieldCount = FOUR_CHAR_CODE('fiel'),        /* Number of fields (UInt8) */
  717.     kImageCodecSettingsFieldOrdering = FOUR_CHAR_CODE('fdom'),    /* Ordering of fields (UInt8)*/
  718.     kImageCodecSettingsFieldOrderingF1F2 = 1,
  719.     kImageCodecSettingsFieldOrderingF2F1 = 2
  720. };
  721.  
  722. typedef CALLBACK_API( ComponentResult , ImageCodecMPDrawBandProcPtr )(void *refcon, ImageSubCodecDecompressRecord *drp);
  723. typedef STACK_UPP_TYPE(ImageCodecMPDrawBandProcPtr)             ImageCodecMPDrawBandUPP;
  724. enum { uppImageCodecMPDrawBandProcInfo = 0x000003F0 };             /* pascal 4_bytes Func(4_bytes, 4_bytes) */
  725. #define NewImageCodecMPDrawBandProc(userRoutine)                 (ImageCodecMPDrawBandUPP)NewRoutineDescriptor((ProcPtr)(userRoutine), uppImageCodecMPDrawBandProcInfo, GetCurrentArchitecture())
  726. #define CallImageCodecMPDrawBandProc(userRoutine, refcon, drp)     CALL_TWO_PARAMETER_UPP((userRoutine), uppImageCodecMPDrawBandProcInfo, (refcon), (drp))
  727. /*    codec selectors 0-127 are reserved by Apple */
  728. /*    codec selectors 128-191 are subtype specific */
  729. /*    codec selectors 192-255 are vendor specific */
  730. /*    codec selectors 256-32767 are available for general use */
  731. /*    negative selectors are reserved by the Component Manager */
  732. EXTERN_API( ComponentResult )
  733. ImageCodecGetCodecInfo            (ComponentInstance         ci,
  734.                                  CodecInfo *            info)                                FIVEWORDINLINE(0x2F3C, 0x0004, 0x0000, 0x7000, 0xA82A);
  735.  
  736. EXTERN_API( ComponentResult )
  737. ImageCodecGetCompressionTime    (ComponentInstance         ci,
  738.                                  PixMapHandle             src,
  739.                                  const Rect *            srcRect,
  740.                                  short                     depth,
  741.                                  CodecQ *                spatialQuality,
  742.                                  CodecQ *                temporalQuality,
  743.                                  unsigned long *        time)                                FIVEWORDINLINE(0x2F3C, 0x0016, 0x0001, 0x7000, 0xA82A);
  744.  
  745. EXTERN_API( ComponentResult )
  746. ImageCodecGetMaxCompressionSize    (ComponentInstance         ci,
  747.                                  PixMapHandle             src,
  748.                                  const Rect *            srcRect,
  749.                                  short                     depth,
  750.                                  CodecQ                 quality,
  751.                                  long *                    size)                                FIVEWORDINLINE(0x2F3C, 0x0012, 0x0002, 0x7000, 0xA82A);
  752.  
  753. EXTERN_API( ComponentResult )
  754. ImageCodecPreCompress            (ComponentInstance         ci,
  755.                                  CodecCompressParams *    params)                                FIVEWORDINLINE(0x2F3C, 0x0004, 0x0003, 0x7000, 0xA82A);
  756.  
  757. EXTERN_API( ComponentResult )
  758. ImageCodecBandCompress            (ComponentInstance         ci,
  759.                                  CodecCompressParams *    params)                                FIVEWORDINLINE(0x2F3C, 0x0004, 0x0004, 0x7000, 0xA82A);
  760.  
  761. EXTERN_API( ComponentResult )
  762. ImageCodecPreDecompress            (ComponentInstance         ci,
  763.                                  CodecDecompressParams * params)                            FIVEWORDINLINE(0x2F3C, 0x0004, 0x0005, 0x7000, 0xA82A);
  764.  
  765. EXTERN_API( ComponentResult )
  766. ImageCodecBandDecompress        (ComponentInstance         ci,
  767.                                  CodecDecompressParams * params)                            FIVEWORDINLINE(0x2F3C, 0x0004, 0x0006, 0x7000, 0xA82A);
  768.  
  769. EXTERN_API( ComponentResult )
  770. ImageCodecBusy                    (ComponentInstance         ci,
  771.                                  ImageSequence             seq)                                FIVEWORDINLINE(0x2F3C, 0x0004, 0x0007, 0x7000, 0xA82A);
  772.  
  773. EXTERN_API( ComponentResult )
  774. ImageCodecGetCompressedImageSize (ComponentInstance     ci,
  775.                                  ImageDescriptionHandle  desc,
  776.                                  Ptr                     data,
  777.                                  long                     bufferSize,
  778.                                  ICMDataProcRecordPtr     dataProc,
  779.                                  long *                    dataSize)                            FIVEWORDINLINE(0x2F3C, 0x0014, 0x0008, 0x7000, 0xA82A);
  780.  
  781. EXTERN_API( ComponentResult )
  782. ImageCodecGetSimilarity            (ComponentInstance         ci,
  783.                                  PixMapHandle             src,
  784.                                  const Rect *            srcRect,
  785.                                  ImageDescriptionHandle  desc,
  786.                                  Ptr                     data,
  787.                                  Fixed *                similarity)                            FIVEWORDINLINE(0x2F3C, 0x0014, 0x0009, 0x7000, 0xA82A);
  788.  
  789. EXTERN_API( ComponentResult )
  790. ImageCodecTrimImage                (ComponentInstance         ci,
  791.                                  ImageDescriptionHandle  Desc,
  792.                                  Ptr                     inData,
  793.                                  long                     inBufferSize,
  794.                                  ICMDataProcRecordPtr     dataProc,
  795.                                  Ptr                     outData,
  796.                                  long                     outBufferSize,
  797.                                  ICMFlushProcRecordPtr     flushProc,
  798.                                  Rect *                    trimRect,
  799.                                  ICMProgressProcRecordPtr  progressProc)                    FIVEWORDINLINE(0x2F3C, 0x0024, 0x000A, 0x7000, 0xA82A);
  800.  
  801. EXTERN_API( ComponentResult )
  802. ImageCodecRequestSettings        (ComponentInstance         ci,
  803.                                  Handle                 settings,
  804.                                  Rect *                    rp,
  805.                                  ModalFilterUPP         filterProc)                            FIVEWORDINLINE(0x2F3C, 0x000C, 0x000B, 0x7000, 0xA82A);
  806.  
  807. EXTERN_API( ComponentResult )
  808. ImageCodecGetSettings            (ComponentInstance         ci,
  809.                                  Handle                 settings)                            FIVEWORDINLINE(0x2F3C, 0x0004, 0x000C, 0x7000, 0xA82A);
  810.  
  811. EXTERN_API( ComponentResult )
  812. ImageCodecSetSettings            (ComponentInstance         ci,
  813.                                  Handle                 settings)                            FIVEWORDINLINE(0x2F3C, 0x0004, 0x000D, 0x7000, 0xA82A);
  814.  
  815. EXTERN_API( ComponentResult )
  816. ImageCodecFlush                    (ComponentInstance         ci)                                    FIVEWORDINLINE(0x2F3C, 0x0000, 0x000E, 0x7000, 0xA82A);
  817.  
  818. EXTERN_API( ComponentResult )
  819. ImageCodecSetTimeCode            (ComponentInstance         ci,
  820.                                  void *                    timeCodeFormat,
  821.                                  void *                    timeCodeTime)                        FIVEWORDINLINE(0x2F3C, 0x0008, 0x000F, 0x7000, 0xA82A);
  822.  
  823. EXTERN_API( ComponentResult )
  824. ImageCodecIsImageDescriptionEquivalent (ComponentInstance  ci,
  825.                                  ImageDescriptionHandle  newDesc,
  826.                                  Boolean *                equivalent)                            FIVEWORDINLINE(0x2F3C, 0x0008, 0x0010, 0x7000, 0xA82A);
  827.  
  828. EXTERN_API( ComponentResult )
  829. ImageCodecNewMemory                (ComponentInstance         ci,
  830.                                  Ptr *                    data,
  831.                                  Size                     dataSize,
  832.                                  long                     dataUse,
  833.                                  ICMMemoryDisposedUPP     memoryGoneProc,
  834.                                  void *                    refCon)                                FIVEWORDINLINE(0x2F3C, 0x0014, 0x0011, 0x7000, 0xA82A);
  835.  
  836. EXTERN_API( ComponentResult )
  837. ImageCodecDisposeMemory            (ComponentInstance         ci,
  838.                                  Ptr                     data)                                FIVEWORDINLINE(0x2F3C, 0x0004, 0x0012, 0x7000, 0xA82A);
  839.  
  840. EXTERN_API( ComponentResult )
  841. ImageCodecHitTestData            (ComponentInstance         ci,
  842.                                  ImageDescriptionHandle  desc,
  843.                                  void *                    data,
  844.                                  Size                     dataSize,
  845.                                  Point                     where,
  846.                                  Boolean *                hit)                                FIVEWORDINLINE(0x2F3C, 0x0014, 0x0013, 0x7000, 0xA82A);
  847.  
  848. EXTERN_API( ComponentResult )
  849. ImageCodecNewImageBufferMemory    (ComponentInstance         ci,
  850.                                  CodecDecompressParams * params,
  851.                                  long                     flags,
  852.                                  ICMMemoryDisposedUPP     memoryGoneProc,
  853.                                  void *                    refCon)                                FIVEWORDINLINE(0x2F3C, 0x0010, 0x0014, 0x7000, 0xA82A);
  854.  
  855. EXTERN_API( ComponentResult )
  856. ImageCodecExtractAndCombineFields (ComponentInstance     ci,
  857.                                  long                     fieldFlags,
  858.                                  void *                    data1,
  859.                                  long                     dataSize1,
  860.                                  ImageDescriptionHandle  desc1,
  861.                                  void *                    data2,
  862.                                  long                     dataSize2,
  863.                                  ImageDescriptionHandle  desc2,
  864.                                  void *                    outputData,
  865.                                  long *                    outDataSize,
  866.                                  ImageDescriptionHandle  descOut)                            FIVEWORDINLINE(0x2F3C, 0x0028, 0x0015, 0x7000, 0xA82A);
  867.  
  868. EXTERN_API( ComponentResult )
  869. ImageCodecGetMaxCompressionSizeWithSources (ComponentInstance  ci,
  870.                                  PixMapHandle             src,
  871.                                  const Rect *            srcRect,
  872.                                  short                     depth,
  873.                                  CodecQ                 quality,
  874.                                  CDSequenceDataSourcePtr  sourceData,
  875.                                  long *                    size)                                FIVEWORDINLINE(0x2F3C, 0x0016, 0x0016, 0x7000, 0xA82A);
  876.  
  877. EXTERN_API( ComponentResult )
  878. ImageCodecSetTimeBase            (ComponentInstance         ci,
  879.                                  void *                    base)                                FIVEWORDINLINE(0x2F3C, 0x0004, 0x0017, 0x7000, 0xA82A);
  880.  
  881. EXTERN_API( ComponentResult )
  882. ImageCodecSourceChanged            (ComponentInstance         ci,
  883.                                  UInt32                 majorSourceChangeSeed,
  884.                                  UInt32                 minorSourceChangeSeed,
  885.                                  CDSequenceDataSourcePtr  sourceData,
  886.                                  long *                    flagsOut)                            FIVEWORDINLINE(0x2F3C, 0x0010, 0x0018, 0x7000, 0xA82A);
  887.  
  888. EXTERN_API( ComponentResult )
  889. ImageCodecFlushFrame            (ComponentInstance         ci,
  890.                                  UInt32                 flags)                                FIVEWORDINLINE(0x2F3C, 0x0004, 0x0019, 0x7000, 0xA82A);
  891.  
  892. EXTERN_API( ComponentResult )
  893. ImageCodecGetSettingsAsText        (ComponentInstance         ci,
  894.                                  Handle *                text)                                FIVEWORDINLINE(0x2F3C, 0x0004, 0x001A, 0x7000, 0xA82A);
  895.  
  896. EXTERN_API( ComponentResult )
  897. ImageCodecGetParameterListHandle (ComponentInstance     ci,
  898.                                  Handle *                parameterDescriptionHandle)            FIVEWORDINLINE(0x2F3C, 0x0004, 0x001B, 0x7000, 0xA82A);
  899.  
  900. EXTERN_API( ComponentResult )
  901. ImageCodecGetParameterList        (ComponentInstance         ci,
  902.                                  QTAtomContainer *        parameterDescription)                FIVEWORDINLINE(0x2F3C, 0x0004, 0x001C, 0x7000, 0xA82A);
  903.  
  904. EXTERN_API( ComponentResult )
  905. ImageCodecCreateStandardParameterDialog (ComponentInstance  ci,
  906.                                  QTAtomContainer         parameterDescription,
  907.                                  QTAtomContainer         parameters,
  908.                                  QTParameterDialogOptions  dialogOptions,
  909.                                  DialogPtr                 existingDialog,
  910.                                  short                     existingUserItem,
  911.                                  QTParameterDialog *    createdDialog)                        FIVEWORDINLINE(0x2F3C, 0x0016, 0x001D, 0x7000, 0xA82A);
  912.  
  913. EXTERN_API( ComponentResult )
  914. ImageCodecIsStandardParameterDialogEvent (ComponentInstance  ci,
  915.                                  EventRecord *            pEvent,
  916.                                  QTParameterDialog         createdDialog)                        FIVEWORDINLINE(0x2F3C, 0x0008, 0x001E, 0x7000, 0xA82A);
  917.  
  918. EXTERN_API( ComponentResult )
  919. ImageCodecDismissStandardParameterDialog (ComponentInstance  ci,
  920.                                  QTParameterDialog         createdDialog)                        FIVEWORDINLINE(0x2F3C, 0x0004, 0x001F, 0x7000, 0xA82A);
  921.  
  922. EXTERN_API( ComponentResult )
  923. ImageCodecStandardParameterDialogDoAction (ComponentInstance  ci,
  924.                                  QTParameterDialog         createdDialog,
  925.                                  long                     action,
  926.                                  void *                    params)                                FIVEWORDINLINE(0x2F3C, 0x000C, 0x0020, 0x7000, 0xA82A);
  927.  
  928. EXTERN_API( ComponentResult )
  929. ImageCodecNewImageGWorld        (ComponentInstance         ci,
  930.                                  CodecDecompressParams * params,
  931.                                  GWorldPtr *            newGW,
  932.                                  long                     flags)                                FIVEWORDINLINE(0x2F3C, 0x000C, 0x0021, 0x7000, 0xA82A);
  933.  
  934. EXTERN_API( ComponentResult )
  935. ImageCodecDisposeImageGWorld    (ComponentInstance         ci,
  936.                                  GWorldPtr                 theGW)                                FIVEWORDINLINE(0x2F3C, 0x0004, 0x0022, 0x7000, 0xA82A);
  937.  
  938. EXTERN_API( ComponentResult )
  939. ImageCodecHitTestDataWithFlags    (ComponentInstance         ci,
  940.                                  ImageDescriptionHandle  desc,
  941.                                  void *                    data,
  942.                                  Size                     dataSize,
  943.                                  Point                     where,
  944.                                  long *                    hit,
  945.                                  long                     hitFlags)                            FIVEWORDINLINE(0x2F3C, 0x0018, 0x0023, 0x7000, 0xA82A);
  946.  
  947. EXTERN_API( ComponentResult )
  948. ImageCodecValidateParameters    (ComponentInstance         ci,
  949.                                  QTAtomContainer         parameters,
  950.                                  QTParameterValidationOptions  validationFlags,
  951.                                  StringPtr                 errorString)                        FIVEWORDINLINE(0x2F3C, 0x000C, 0x0024, 0x7000, 0xA82A);
  952.  
  953. EXTERN_API( ComponentResult )
  954. ImageCodecGetBaseMPWorkFunction    (ComponentInstance         ci,
  955.                                  ComponentMPWorkFunctionUPP * workFunction,
  956.                                  void **                refCon,
  957.                                  ImageCodecMPDrawBandUPP  drawProc,
  958.                                  void *                    drawProcRefCon)                        FIVEWORDINLINE(0x2F3C, 0x0010, 0x0025, 0x7000, 0xA82A);
  959.  
  960. EXTERN_API( ComponentResult )
  961. ImageCodecPreflight                (ComponentInstance         ci,
  962.                                  CodecDecompressParams * params)                            FIVEWORDINLINE(0x2F3C, 0x0004, 0x0200, 0x7000, 0xA82A);
  963.  
  964. EXTERN_API( ComponentResult )
  965. ImageCodecInitialize            (ComponentInstance         ci,
  966.                                  ImageSubCodecDecompressCapabilities * cap)                    FIVEWORDINLINE(0x2F3C, 0x0004, 0x0201, 0x7000, 0xA82A);
  967.  
  968. EXTERN_API( ComponentResult )
  969. ImageCodecBeginBand                (ComponentInstance         ci,
  970.                                  CodecDecompressParams * params,
  971.                                  ImageSubCodecDecompressRecord * drp,
  972.                                  long                     flags)                                FIVEWORDINLINE(0x2F3C, 0x000C, 0x0202, 0x7000, 0xA82A);
  973.  
  974. EXTERN_API( ComponentResult )
  975. ImageCodecDrawBand                (ComponentInstance         ci,
  976.                                  ImageSubCodecDecompressRecord * drp)                        FIVEWORDINLINE(0x2F3C, 0x0004, 0x0203, 0x7000, 0xA82A);
  977.  
  978. EXTERN_API( ComponentResult )
  979. ImageCodecEndBand                (ComponentInstance         ci,
  980.                                  ImageSubCodecDecompressRecord * drp,
  981.                                  OSErr                     result,
  982.                                  long                     flags)                                FIVEWORDINLINE(0x2F3C, 0x000A, 0x0204, 0x7000, 0xA82A);
  983.  
  984. EXTERN_API( ComponentResult )
  985. ImageCodecQueueStarting            (ComponentInstance         ci)                                    FIVEWORDINLINE(0x2F3C, 0x0000, 0x0205, 0x7000, 0xA82A);
  986.  
  987. EXTERN_API( ComponentResult )
  988. ImageCodecQueueStopping            (ComponentInstance         ci)                                    FIVEWORDINLINE(0x2F3C, 0x0000, 0x0206, 0x7000, 0xA82A);
  989.  
  990. EXTERN_API( ComponentResult )
  991. ImageCodecDroppingFrame            (ComponentInstance         ci,
  992.                                  const ImageSubCodecDecompressRecord * drp)                    FIVEWORDINLINE(0x2F3C, 0x0004, 0x0207, 0x7000, 0xA82A);
  993.  
  994.  
  995.  
  996.  
  997. /* selectors for component calls */
  998. enum {
  999.     kImageCodecGetCodecInfoSelect                    = 0x0000,
  1000.     kImageCodecGetCompressionTimeSelect                = 0x0001,
  1001.     kImageCodecGetMaxCompressionSizeSelect            = 0x0002,
  1002.     kImageCodecPreCompressSelect                    = 0x0003,
  1003.     kImageCodecBandCompressSelect                    = 0x0004,
  1004.     kImageCodecPreDecompressSelect                    = 0x0005,
  1005.     kImageCodecBandDecompressSelect                    = 0x0006,
  1006.     kImageCodecBusySelect                            = 0x0007,
  1007.     kImageCodecGetCompressedImageSizeSelect            = 0x0008,
  1008.     kImageCodecGetSimilaritySelect                    = 0x0009,
  1009.     kImageCodecTrimImageSelect                        = 0x000A,
  1010.     kImageCodecRequestSettingsSelect                = 0x000B,
  1011.     kImageCodecGetSettingsSelect                    = 0x000C,
  1012.     kImageCodecSetSettingsSelect                    = 0x000D,
  1013.     kImageCodecFlushSelect                            = 0x000E,
  1014.     kImageCodecSetTimeCodeSelect                    = 0x000F,
  1015.     kImageCodecIsImageDescriptionEquivalentSelect    = 0x0010,
  1016.     kImageCodecNewMemorySelect                        = 0x0011,
  1017.     kImageCodecDisposeMemorySelect                    = 0x0012,
  1018.     kImageCodecHitTestDataSelect                    = 0x0013,
  1019.     kImageCodecNewImageBufferMemorySelect            = 0x0014,
  1020.     kImageCodecExtractAndCombineFieldsSelect        = 0x0015,
  1021.     kImageCodecGetMaxCompressionSizeWithSourcesSelect = 0x0016,
  1022.     kImageCodecSetTimeBaseSelect                    = 0x0017,
  1023.     kImageCodecSourceChangedSelect                    = 0x0018,
  1024.     kImageCodecFlushFrameSelect                        = 0x0019,
  1025.     kImageCodecGetSettingsAsTextSelect                = 0x001A,
  1026.     kImageCodecGetParameterListHandleSelect            = 0x001B,
  1027.     kImageCodecGetParameterListSelect                = 0x001C,
  1028.     kImageCodecCreateStandardParameterDialogSelect = 0x001D,
  1029.     kImageCodecIsStandardParameterDialogEventSelect = 0x001E,
  1030.     kImageCodecDismissStandardParameterDialogSelect = 0x001F,
  1031.     kImageCodecStandardParameterDialogDoActionSelect = 0x0020,
  1032.     kImageCodecNewImageGWorldSelect                    = 0x0021,
  1033.     kImageCodecDisposeImageGWorldSelect                = 0x0022,
  1034.     kImageCodecHitTestDataWithFlagsSelect            = 0x0023,
  1035.     kImageCodecValidateParametersSelect                = 0x0024,
  1036.     kImageCodecGetBaseMPWorkFunctionSelect            = 0x0025,
  1037.     kImageCodecPreflightSelect                        = 0x0200,
  1038.     kImageCodecInitializeSelect                        = 0x0201,
  1039.     kImageCodecBeginBandSelect                        = 0x0202,
  1040.     kImageCodecDrawBandSelect                        = 0x0203,
  1041.     kImageCodecEndBandSelect                        = 0x0204,
  1042.     kImageCodecQueueStartingSelect                    = 0x0205,
  1043.     kImageCodecQueueStoppingSelect                    = 0x0206,
  1044.     kImageCodecDroppingFrameSelect                    = 0x0207
  1045. };
  1046.  
  1047.  
  1048.  
  1049.  
  1050.  
  1051.  
  1052.  
  1053.  
  1054.  
  1055.  
  1056. enum {
  1057.     kMotionJPEGTag                = FOUR_CHAR_CODE('mjpg'),
  1058.     kJPEGQuantizationTablesImageDescriptionExtension = FOUR_CHAR_CODE('mjqt'),
  1059.     kJPEGHuffmanTablesImageDescriptionExtension = FOUR_CHAR_CODE('mjht'),
  1060.     kFieldInfoImageDescriptionExtension = FOUR_CHAR_CODE('fiel') /* image description extension describing the field count and field orderings*/
  1061. };
  1062.  
  1063.  
  1064. enum {
  1065.     kFieldOrderUnknown            = 0,
  1066.     kFieldsStoredF1F2DisplayedF1F2 = 1,
  1067.     kFieldsStoredF1F2DisplayedF2F1 = 2,
  1068.     kFieldsStoredF2F1DisplayedF1F2 = 5,
  1069.     kFieldsStoredF2F1DisplayedF2F1 = 6
  1070. };
  1071.  
  1072.  
  1073. struct MotionJPEGApp1Marker {
  1074.     long                             unused;
  1075.     long                             tag;
  1076.     long                             fieldSize;
  1077.     long                             paddedFieldSize;
  1078.     long                             offsetToNextField;
  1079.     long                             qTableOffset;
  1080.     long                             huffmanTableOffset;
  1081.     long                             sofOffset;
  1082.     long                             sosOffset;
  1083.     long                             soiOffset;
  1084. };
  1085. typedef struct MotionJPEGApp1Marker        MotionJPEGApp1Marker;
  1086.  
  1087. struct FieldInfoImageDescriptionExtension {
  1088.     UInt8                             fieldCount;
  1089.     UInt8                             fieldOrderings;
  1090. };
  1091. typedef struct FieldInfoImageDescriptionExtension FieldInfoImageDescriptionExtension;
  1092.  
  1093. EXTERN_API( ComponentResult )
  1094. QTPhotoSetSampling                (ComponentInstance         codec,
  1095.                                  short                     yH,
  1096.                                  short                     yV,
  1097.                                  short                     cbH,
  1098.                                  short                     cbV,
  1099.                                  short                     crH,
  1100.                                  short                     crV)                                FIVEWORDINLINE(0x2F3C, 0x000C, 0x0100, 0x7000, 0xA82A);
  1101.  
  1102. EXTERN_API( ComponentResult )
  1103. QTPhotoSetRestartInterval        (ComponentInstance         codec,
  1104.                                  unsigned short         restartInterval)                    FIVEWORDINLINE(0x2F3C, 0x0002, 0x0101, 0x7000, 0xA82A);
  1105.  
  1106. EXTERN_API( ComponentResult )
  1107. QTPhotoDefineHuffmanTable        (ComponentInstance         codec,
  1108.                                  short                     componentNumber,
  1109.                                  Boolean                 isDC,
  1110.                                  unsigned char *        lengthCounts,
  1111.                                  unsigned char *        values)                                FIVEWORDINLINE(0x2F3C, 0x000C, 0x0102, 0x7000, 0xA82A);
  1112.  
  1113. EXTERN_API( ComponentResult )
  1114. QTPhotoDefineQuantizationTable    (ComponentInstance         codec,
  1115.                                  short                     componentNumber,
  1116.                                  unsigned char *        table)                                FIVEWORDINLINE(0x2F3C, 0x0006, 0x0103, 0x7000, 0xA82A);
  1117.  
  1118.  
  1119. /* selectors for component calls */
  1120. enum {
  1121.     kQTPhotoSetSamplingSelect                        = 0x0100,
  1122.     kQTPhotoSetRestartIntervalSelect                = 0x0101,
  1123.     kQTPhotoDefineHuffmanTableSelect                = 0x0102,
  1124.     kQTPhotoDefineQuantizationTableSelect            = 0x0103
  1125. };
  1126.  
  1127.  
  1128.  
  1129.  
  1130. /* source identifier -- placed in root container of description, one or more required */
  1131.  
  1132. enum {
  1133.     kEffectSourceName            = FOUR_CHAR_CODE('src ')
  1134. };
  1135.  
  1136.  
  1137. /* source type -- placed in the input map to identify the source kind */
  1138.  
  1139. enum {
  1140.     kEffectDataSourceType        = FOUR_CHAR_CODE('dtst')
  1141. };
  1142.  
  1143. /*  default effect types */
  1144.  
  1145. enum {
  1146.     kEffectRawSource            = 0,                            /* the source is raw image data*/
  1147.     kEffectGenericType            = FOUR_CHAR_CODE('geff')        /* generic effect for combining others*/
  1148. };
  1149.  
  1150. typedef struct EffectSource             EffectSource;
  1151.  
  1152. typedef EffectSource *                    EffectSourcePtr;
  1153.  
  1154. union SourceData {
  1155.     CDSequenceDataSourcePtr         image;
  1156.     EffectSourcePtr                 effect;
  1157. };
  1158. typedef union SourceData                SourceData;
  1159.  
  1160.  
  1161. struct EffectSource {
  1162.     long                             effectType;                    /* type of effect or kEffectRawSource if raw ICM data*/
  1163.     Ptr                             data;                        /* track data for this effect*/
  1164.     SourceData                         source;                        /* source/effect pointers*/
  1165.     EffectSourcePtr                 next;                        /* the next source for the parent effect*/
  1166. };
  1167.  
  1168.  
  1169. struct EffectsFrameParams {
  1170.     ICMFrameTimeRecord                 frameTime;                    /* timing data*/
  1171.     long                             effectDuration;                /* the duration of a single effect frame*/
  1172.     Boolean                         doAsync;                    /* set to true if the effect can go async*/
  1173.     unsigned char                     pad[3];
  1174.     EffectSourcePtr                 source;                        /* ptr to the source input tree*/
  1175.     void *                            refCon;                        /* storage for the effect*/
  1176. };
  1177. typedef struct EffectsFrameParams        EffectsFrameParams;
  1178. typedef EffectsFrameParams *            EffectsFrameParamsPtr;
  1179.  
  1180.  
  1181. EXTERN_API( ComponentResult )
  1182. ImageCodecEffectSetup            (ComponentInstance         effect,
  1183.                                  CodecDecompressParams * p)                                    FIVEWORDINLINE(0x2F3C, 0x0004, 0x0300, 0x7000, 0xA82A);
  1184.  
  1185. EXTERN_API( ComponentResult )
  1186. ImageCodecEffectBegin            (ComponentInstance         effect,
  1187.                                  CodecDecompressParams * p,
  1188.                                  EffectsFrameParamsPtr     ePtr)                                FIVEWORDINLINE(0x2F3C, 0x0008, 0x0301, 0x7000, 0xA82A);
  1189.  
  1190. EXTERN_API( ComponentResult )
  1191. ImageCodecEffectRenderFrame        (ComponentInstance         effect,
  1192.                                  EffectsFrameParamsPtr     p)                                    FIVEWORDINLINE(0x2F3C, 0x0004, 0x0302, 0x7000, 0xA82A);
  1193.  
  1194. EXTERN_API( ComponentResult )
  1195. ImageCodecEffectConvertEffectSourceToFormat (ComponentInstance  effect,
  1196.                                  EffectSourcePtr         sourceToConvert,
  1197.                                  ImageDescriptionHandle  requestedDesc)                        FIVEWORDINLINE(0x2F3C, 0x0008, 0x0303, 0x7000, 0xA82A);
  1198.  
  1199. EXTERN_API( ComponentResult )
  1200. ImageCodecEffectCancel            (ComponentInstance         effect,
  1201.                                  EffectsFrameParamsPtr     p)                                    FIVEWORDINLINE(0x2F3C, 0x0004, 0x0304, 0x7000, 0xA82A);
  1202.  
  1203. EXTERN_API( ComponentResult )
  1204. ImageCodecEffectGetSpeed        (ComponentInstance         effect,
  1205.                                  QTAtomContainer         parameters,
  1206.                                  Fixed *                pFPS)                                FIVEWORDINLINE(0x2F3C, 0x0008, 0x0305, 0x7000, 0xA82A);
  1207.  
  1208.  
  1209.  
  1210. /* selectors for component calls */
  1211. enum {
  1212.     kImageCodecEffectSetupSelect                    = 0x0300,
  1213.     kImageCodecEffectBeginSelect                    = 0x0301,
  1214.     kImageCodecEffectRenderFrameSelect                = 0x0302,
  1215.     kImageCodecEffectConvertEffectSourceToFormatSelect = 0x0303,
  1216.     kImageCodecEffectCancelSelect                    = 0x0304,
  1217.     kImageCodecEffectGetSpeedSelect                    = 0x0305
  1218. };
  1219.  
  1220.  
  1221. /* curve atom types and data structures */
  1222.  
  1223. enum {
  1224.     kCurvePathAtom                = FOUR_CHAR_CODE('path'),
  1225.     kCurveEndAtom                = FOUR_CHAR_CODE('zero'),
  1226.     kCurveAntialiasControlAtom    = FOUR_CHAR_CODE('anti'),
  1227.     kCurveAntialiasOff            = 0,
  1228.     kCurveAntialiasOn            = (long)0xFFFFFFFF,
  1229.     kCurveFillTypeAtom            = FOUR_CHAR_CODE('fill'),
  1230.     kCurvePenThicknessAtom        = FOUR_CHAR_CODE('pent'),
  1231.     kCurveMiterLimitAtom        = FOUR_CHAR_CODE('mitr'),
  1232.     kCurveJoinAttributesAtom    = FOUR_CHAR_CODE('join'),
  1233.     kCurveMinimumDepthAtom        = FOUR_CHAR_CODE('mind'),
  1234.     kCurveDepthAlwaysOffscreenMask = (long)0x80000000,
  1235.     kCurveTransferModeAtom        = FOUR_CHAR_CODE('xfer'),
  1236.     kCurveGradientAngleAtom        = FOUR_CHAR_CODE('angl'),
  1237.     kCurveGradientRadiusAtom    = FOUR_CHAR_CODE('radi'),
  1238.     kCurveGradientOffsetAtom    = FOUR_CHAR_CODE('cent')
  1239. };
  1240.  
  1241.  
  1242. enum {
  1243.     kCurveARGBColorAtom            = FOUR_CHAR_CODE('argb')
  1244. };
  1245.  
  1246.  
  1247. struct ARGBColor {
  1248.     unsigned short                     alpha;
  1249.     unsigned short                     red;
  1250.     unsigned short                     green;
  1251.     unsigned short                     blue;
  1252. };
  1253. typedef struct ARGBColor                ARGBColor;
  1254.  
  1255. enum {
  1256.     kCurveGradientRecordAtom    = FOUR_CHAR_CODE('grad')
  1257. };
  1258.  
  1259.  
  1260. struct GradientColorRecord {
  1261.     ARGBColor                         thisColor;
  1262.     Fixed                             endingPercentage;
  1263. };
  1264. typedef struct GradientColorRecord        GradientColorRecord;
  1265.  
  1266. typedef GradientColorRecord *            GradientColorPtr;
  1267.  
  1268. enum {
  1269.     kCurveGradientTypeAtom        = FOUR_CHAR_CODE('grdt')
  1270. };
  1271.  
  1272. /* currently supported gradient types */
  1273.  
  1274. enum {
  1275.     kLinearGradient                = 0,
  1276.     kCircularGradient            = 1
  1277. };
  1278.  
  1279. typedef long                             GradientType;
  1280. EXTERN_API( ComponentResult )
  1281. CurveGetLength                    (ComponentInstance         effect,
  1282.                                  gxPaths *                target,
  1283.                                  long                     index,
  1284.                                  wide *                    wideLength)                            FIVEWORDINLINE(0x2F3C, 0x000C, 0x0100, 0x7000, 0xA82A);
  1285.  
  1286. EXTERN_API( ComponentResult )
  1287. CurveLengthToPoint                (ComponentInstance         effect,
  1288.                                  gxPaths *                target,
  1289.                                  long                     index,
  1290.                                  Fixed                     length,
  1291.                                  FixedPoint *            location,
  1292.                                  FixedPoint *            tangent)                            FIVEWORDINLINE(0x2F3C, 0x0014, 0x0101, 0x7000, 0xA82A);
  1293.  
  1294. EXTERN_API( ComponentResult )
  1295. CurveNewPath                    (ComponentInstance         effect,
  1296.                                  Handle *                pPath)                                FIVEWORDINLINE(0x2F3C, 0x0004, 0x0102, 0x7000, 0xA82A);
  1297.  
  1298. EXTERN_API( ComponentResult )
  1299. CurveCountPointsInPath            (ComponentInstance         effect,
  1300.                                  gxPaths *                aPath,
  1301.                                  unsigned long             contourIndex,
  1302.                                  unsigned long *        pCount)                                FIVEWORDINLINE(0x2F3C, 0x000C, 0x0103, 0x7000, 0xA82A);
  1303.  
  1304. EXTERN_API( ComponentResult )
  1305. CurveGetPathPoint                (ComponentInstance         effect,
  1306.                                  gxPaths *                aPath,
  1307.                                  unsigned long             contourIndex,
  1308.                                  unsigned long             pointIndex,
  1309.                                  gxPoint *                thePoint,
  1310.                                  Boolean *                ptIsOnPath)                            FIVEWORDINLINE(0x2F3C, 0x0014, 0x0104, 0x7000, 0xA82A);
  1311.  
  1312. EXTERN_API( ComponentResult )
  1313. CurveInsertPointIntoPath        (ComponentInstance         effect,
  1314.                                  gxPoint *                aPoint,
  1315.                                  Handle                 thePath,
  1316.                                  unsigned long             contourIndex,
  1317.                                  unsigned long             pointIndex,
  1318.                                  Boolean                 ptIsOnPath)                            FIVEWORDINLINE(0x2F3C, 0x0012, 0x0105, 0x7000, 0xA82A);
  1319.  
  1320. EXTERN_API( ComponentResult )
  1321. CurveSetPathPoint                (ComponentInstance         effect,
  1322.                                  gxPaths *                aPath,
  1323.                                  unsigned long             contourIndex,
  1324.                                  unsigned long             pointIndex,
  1325.                                  gxPoint *                thePoint,
  1326.                                  Boolean                 ptIsOnPath)                            FIVEWORDINLINE(0x2F3C, 0x0012, 0x0106, 0x7000, 0xA82A);
  1327.  
  1328. EXTERN_API( ComponentResult )
  1329. CurveGetNearestPathPoint        (ComponentInstance         effect,
  1330.                                  gxPaths *                aPath,
  1331.                                  FixedPoint *            thePoint,
  1332.                                  unsigned long *        contourIndex,
  1333.                                  unsigned long *        pointIndex,
  1334.                                  Fixed *                theDelta)                            FIVEWORDINLINE(0x2F3C, 0x0014, 0x0107, 0x7000, 0xA82A);
  1335.  
  1336. EXTERN_API( ComponentResult )
  1337. CurvePathPointToLength            (ComponentInstance         ci,
  1338.                                  gxPaths *                aPath,
  1339.                                  Fixed                     startDist,
  1340.                                  Fixed                     endDist,
  1341.                                  FixedPoint *            thePoint,
  1342.                                  Fixed *                pLength)                            FIVEWORDINLINE(0x2F3C, 0x0014, 0x0108, 0x7000, 0xA82A);
  1343.  
  1344. EXTERN_API( ComponentResult )
  1345. CurveCreateVectorStream            (ComponentInstance         effect,
  1346.                                  Handle *                pStream)                            FIVEWORDINLINE(0x2F3C, 0x0004, 0x0109, 0x7000, 0xA82A);
  1347.  
  1348. EXTERN_API( ComponentResult )
  1349. CurveAddAtomToVectorStream        (ComponentInstance         effect,
  1350.                                  OSType                 atomType,
  1351.                                  Size                     atomSize,
  1352.                                  void *                    pAtomData,
  1353.                                  Handle                 vectorStream)                        FIVEWORDINLINE(0x2F3C, 0x0010, 0x010A, 0x7000, 0xA82A);
  1354.  
  1355. EXTERN_API( ComponentResult )
  1356. CurveAddPathAtomToVectorStream    (ComponentInstance         effect,
  1357.                                  Handle                 pathData,
  1358.                                  Handle                 vectorStream)                        FIVEWORDINLINE(0x2F3C, 0x0008, 0x010B, 0x7000, 0xA82A);
  1359.  
  1360. EXTERN_API( ComponentResult )
  1361. CurveAddZeroAtomToVectorStream    (ComponentInstance         effect,
  1362.                                  Handle                 vectorStream)                        FIVEWORDINLINE(0x2F3C, 0x0004, 0x010C, 0x7000, 0xA82A);
  1363.  
  1364. EXTERN_API( ComponentResult )
  1365. CurveGetAtomDataFromVectorStream (ComponentInstance     effect,
  1366.                                  Handle                 vectorStream,
  1367.                                  long                     atomType,
  1368.                                  long *                    dataSize,
  1369.                                  Ptr *                    dataPtr)                            FIVEWORDINLINE(0x2F3C, 0x0010, 0x010D, 0x7000, 0xA82A);
  1370.  
  1371.  
  1372.  
  1373. /* selectors for component calls */
  1374. enum {
  1375.     kCurveGetLengthSelect                            = 0x0100,
  1376.     kCurveLengthToPointSelect                        = 0x0101,
  1377.     kCurveNewPathSelect                                = 0x0102,
  1378.     kCurveCountPointsInPathSelect                    = 0x0103,
  1379.     kCurveGetPathPointSelect                        = 0x0104,
  1380.     kCurveInsertPointIntoPathSelect                    = 0x0105,
  1381.     kCurveSetPathPointSelect                        = 0x0106,
  1382.     kCurveGetNearestPathPointSelect                    = 0x0107,
  1383.     kCurvePathPointToLengthSelect                    = 0x0108,
  1384.     kCurveCreateVectorStreamSelect                    = 0x0109,
  1385.     kCurveAddAtomToVectorStreamSelect                = 0x010A,
  1386.     kCurveAddPathAtomToVectorStreamSelect            = 0x010B,
  1387.     kCurveAddZeroAtomToVectorStreamSelect            = 0x010C,
  1388.     kCurveGetAtomDataFromVectorStreamSelect            = 0x010D
  1389. };
  1390. /* UPP call backs */
  1391.  
  1392. #if PRAGMA_STRUCT_ALIGN
  1393.     #pragma options align=reset
  1394. #elif PRAGMA_STRUCT_PACKPUSH
  1395.     #pragma pack(pop)
  1396. #elif PRAGMA_STRUCT_PACK
  1397.     #pragma pack()
  1398. #endif
  1399.  
  1400. #ifdef PRAGMA_IMPORT_OFF
  1401. #pragma import off
  1402. #elif PRAGMA_IMPORT
  1403. #pragma import reset
  1404. #endif
  1405.  
  1406. #ifdef __cplusplus
  1407. }
  1408. #endif
  1409.  
  1410. #endif /* __IMAGECODEC__ */
  1411.  
  1412.